time: 2021.3
# -*- coding: utf-8 -*-
# @Time    : 2021/4/20 22:32
# @Author  : luogan
# @Email   : 468640092@qq.com
# @File    : ll.py
# @Software: PyCharm.

# alist = [1, 2, 5, 6, 3, 8, 7, 9, 12, 10]
def buble_sort(alist):
    z = len(alist)
    for i in range(0, z-1):
        for j in range(0, z-1-i):
            if alist[j] > alist[j+1]:
                alist[j], alist[j+1] = alist[j+1], alist[j]
    return alist
li = [1,2,23,6,5,15,3,2,17,8]
print(buble_sort(li))
